package com.sven.sharedb.range.mapper;

import com.sven.sharedb.core.mapper.CommonMapper;
import com.sven.sharedb.range.entity.ShardingOrderWz;
import com.sven.sharedb.range.entity.dto.UpdateByExampleDTO;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface ShardingOrderWzMapper extends CommonMapper<ShardingOrderWz> {
    List<ShardingOrderWz> shardingsphereQueryBetweenDateSQL(Date beginDate, Date endDate);

    List<ShardingOrderWz> selectBySql(String orderId, Date createDate, Date beginDate, Date endDate);

    int updateBySql(@Param("example") UpdateByExampleDTO dto);

    int deleteBySql(@Param("example") UpdateByExampleDTO dto);

    int createNextTimeTable(@Param("newTableName") String newTableName, @Param("logicTableName") String logicTableName);

    int selectTableNameCount(@Param("tableName") String tableName);

    List<ShardingOrderWz> selectJoinDetailBySql(String orderId, Date createDate, Date beginDate, Date endDate);
}